package edu.nf.bs.service.impl;

import com.github.pagehelper.PageInfo;
import edu.nf.bs.dao.StationsMapper;
import edu.nf.bs.entity.Stations;
import edu.nf.bs.exception.AddException;
import edu.nf.bs.service.StationsService;

import java.util.List;

public class StationsServerImpl implements StationsService {
    private StationsMapper mapper;

    public void setMapper(StationsMapper mapper) {
        this.mapper = mapper;
    }

    @Override
    public PageInfo<Stations> pageStations(String expressId, Integer pageNum, Integer PageSize) {
        List<Stations> stations = mapper.queryStations(expressId, pageNum, PageSize);
        PageInfo<Stations> stationsPageInfo = new PageInfo<>(stations);
        return stationsPageInfo;
    }

}
